package com.wzcl.app.model.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

@Data
public class CommodityDto extends BaseDto{

    @NotNull(message = "货物ID号不能为空")
    @ApiModelProperty(value = "货物ID号,Course或Material表中的Id")
    private Integer resourceId;

    @NotNull(message = "货物类型不能为空")
    @ApiModelProperty(value = "类型")
    private Integer type;

    @NotBlank(message = "商品名称不能为空")
    @ApiModelProperty(value = "商品名称")
    private String name;

    @ApiModelProperty(value = "图片")
    private List<String> pictures;

    @NotBlank(message = "原价不能为空")
    @ApiModelProperty(value = "原价")
    private String oldPrice;

    @NotBlank(message = "现价不能为空")
    @ApiModelProperty(value = "现价")
    private String currentPrice;

    @ApiModelProperty(value = "库存")
    private Integer stock;

    @ApiModelProperty(value = "已售数")
    private Integer sold;

    @ApiModelProperty(value = "是否上架")
    private Boolean sale;

    @ApiModelProperty(value = "上架时间")
    private Date saleTime;

    @NotNull(message = "配送需求不能为空")
    @ApiModelProperty(value = "是否需要配送")
    private Boolean needDelivery;

    @NotNull(message = "是否推荐不能为空")
    @ApiModelProperty(value = "是否推荐")
    private Boolean recommend;

    @NotNull(message = "排序字段不能为空")
    @ApiModelProperty(value = "排序字段")
    private Integer orderNo;

    @ApiModelProperty(value = "绑定/解绑")
    private Boolean isBind;

    @ApiModelProperty(value = "上线/下架")
    private Boolean isSale;

    @ApiModelProperty(value = "是否开启规格配置")
    private Boolean spec;

    @ApiModelProperty(value = "活动IdList")
    private List<Integer>  activityIdList;

    @ApiModelProperty(value = "活动条件")
    private ActivityDto activityDto;
}
